#pragma once
#ifndef PLAYER_H_
#define PLAYER_H_

#include "Enums.h"
#include "Move.h"
#include "../Pieces/Piece.h"

#include <string>
#include <vector>
using namespace std;


namespace Core
{
	class Player
	{
	public:
		Player(ChColor color, string name = "");
		~Player();

		string name() const { return _name; }
		void name(string val) { _name = val; }
		ChColor color() const { return _color; }
		//int number() const { return (int)_color; }
		Piece * getPiece(int i) const;
		
		vector<Piece*> & promotes();
		bool canMoveAny();
		void deleteValidMoves();
		virtual void move(int r0, int c0, int r1, int c1);

		virtual void move();

	private:
		string _name;
		ChColor _color;
		Piece * _pieces[16];
		
		/* promoted pawns vectors */
		vector<Piece*> _pieces2;
	};

}

#endif
